<template>
  <div class="select_header_wrapper">
    <img class="img" :src="info.icon" width="40" height="40">
    <h1 class="title">{{info.title}}</h1>
    <div class="new_info">
      <div class="new new_action active">有关动态</div>
      <div class="new new_video">最新投稿</div>
      <div class="new_action_info">
        <span class="icon icon-fire"></span>
        <span class="info">{{info.desc}}</span>
      </div>

      <div class="more_data">
        <div class="change_video">
          <span class="el-icon-loading"></span>
          <span>5565条更新数据</span>
        </div>
        <div class="more">
          <span>更多</span>
          <span class="ion-ios-arrow-right"></span>
        </div>
      </div>

    </div>
  </div>
</template>

<script>
  const HEADER_TITLE = '小海标题';
  const HEADER_DESC = '毒舌老外不毒舌?';
  const HEADER_ICON = 'http://oiq23viaf.bkt.clouddn.com/upload_icon2.png';

  export default {
    props: {
      info: {
        type: Object,
        default() {
          return {
            title: HEADER_TITLE,
            icon: HEADER_ICON,
            desc: HEADER_DESC
          };
        }
      }
    }
  };
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss" rel="stylesheet/scss">
  @import "../../common/scss/mixin.Scss";

  .select_header_wrapper{
    position: relative;
    display: flex;
    flex-direction: row;
    line-height: 25px;
    width: 100%;
    height: 25px;
    font-size: 0;
    .img{
      margin-left: 5px;
      margin-top: -10px;
    }
    .title{
      margin-top: 0;
      margin-left: 10px;
      font-size: 24px;
      color: #222;

    }
    .new_info{
      .new{
        display: inline-block;
        margin-left: 20px;
        font-size: 12px;
        color: #222;
      }
      .active{
        @include border-bottom-1px(rgba(7,17,27,0.5))
      }
      .new_action_info{
        display: inline-block;
        margin-left: 40px;
        .icon{
          font-size: 14px;
          color: hotpink;
        }
        .info{
          margin-left: 8px;
          font-size: 12px;
          color: #6d757a;
        }
      }
      .more_data{
        position: absolute;
        right: 0;
        top:0;
        .change_video,.more{
          display: inline-block;
          cursor: pointer;
          padding: 0 10px;
          border: 1px solid rgb(204, 208, 215);
          border-radius: 5px;
          font-size: 12px;
          color: #222;
          transition: all 0.3s;
          &:hover{
            background: rgb(204, 208, 215);
          }
          .icon-loop2{
            display: inline-block;
            transition: all 0.3s;
          }
          &:hover .icon-loop2{
            transform: rotate(180deg);
          }
        }
        .change_video{
          margin-right: 10px;
        }
      }
    }

  }
</style>
